Home > Mobile >  QT listView/listWidget, click on the list, how to display in which the two buttons, similar to the f
QT listView/listWidget, click on the list, how to display in which the two buttons, similar to the f

Time:10-06


As shown in figure: the two buttons shown in nong to click on the item is??

CodePudding user response:

In onItemClick a custom Dialog
AlertDialog. Builder Builder=new AlertDialog. Builder (context);
LayoutInflater lay=LayoutInflater. The from (context);
//will be loaded into the View layout
View the view1=lay. Inflate (R.l ayout. Pinglun_select, null);
The view1 TextView mtxtpinglunhuifu=(TextView)
The findViewById (R.i d.p inglun_huifu);
The view1 TextView mtxtpinglundel=(TextView)
The findViewById (R.i d.p inglun_delete);
Builder. SetView (the view1);

The view in the TextView:
& lt; TextView XMLNS: android="http://schemas.android.com/apk/res/android"
Android: layout_width="wrap_content"
Android: layout_height="wrap_content"
Android: drawableTop="@ drawable/phone_sys"
Android: text="system test"
Android: gravity="center"
Android: background="@ drawable/top_bg"
/& gt;
Textview rendering

Don't know is not for you,

CodePudding user response:

Baidu search QT right-click menu, a bunch of code

CodePudding user response:

You can solve this problem is to right-click menu
  • Related