QRadioButton in disabled mode



  • How to make the radio button not receive any signals but just act as a page indicator, Infact I am trying to achieve the page indicator as displayed when each page is shown is there a seperate class to achieve that.? Page indicator as in dots displaying the page shown to the user.



  • Don't. A radio button is an interactive element, don't confuse your users by abusing it for something that it is not. Seriously, it is not hard to just render a set of dots where one dot is a bit lighter than the rest in a specialized widget.



  • I agree with Andre.



  • I agree with Andre. But, if you really want do that you can just use images for that, search for one that look's like with a radio button and put that in a label edit. sorry for my lazy english! =)



  • Use label, is more simple.



  • [quote author="gdouglas7" date="1333372742"]Use label, is more simple.[/quote]
    How would you use a QLabel to show a page indicator (you know, like a row of dots where the highlighted dot represents the current page)?



  • Depends if you are using QStackedWidget you could get the current page with the index of the element, right?



  • [quote author="gdouglas7" date="1333373537"]Depends if you are using QStackedWidget you could get the current page with the index of the element, right?[/quote]
    If I understand Kewal right, he is looking for a display widget to indicate a page. In this context, none of your answers make any sense to me so far. So please, eleborate. Perhaps you can create a small example that illustrates what you mean?



  • Maybe I have not got it right, but what I'm saying is that if it is using QStackedWidget and changing the page of the own widget, he could use the current index to the display of the page.

    @ui-> label-> setText (ui-> stackedwidget-> currentIndex ());@



  • [quote author="gdouglas7" date="1333375080"]Maybe I have not got it right, but what I'm saying is that if it is using QStackedWidget and changing the page of the own widget, he could use the current index to the display of the page.

    @ui-> label-> setText (ui-> stackedwidget-> currentIndex ());@[/quote]
    Right... but he was trying - I gather - to display something like this:
    !http://i.stack.imgur.com/ZoETt.png(iOS page indicator)!



  • Now I understand the problem. RadionButton is not really the best option, perhaps by using two similar images with different colors and repeating the image according to the number of existing pages.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.